import {getDictList} from '@/script/api/common/index.js'
export default {
	data(){
		return {}
	},
	methods: {
		// 初始化页面所需字典
		initGetDicts(){
			let _self = this
			_self.dictsList.forEach(search => {
				_self.dictsItem(search)
			})
		},
		// 初始化具体字典
		dictsItem(item){
			let _self = this
			return new Promise((resolve, reject) => {
				getDictList(item['name']).then(res => {
					_self.$set(item, 'child', [...item.child || [], ...res.data])
				});
			})
		},
	},
}